package com.example.mapper.carecommunity.homebasedcare;

import com.example.bean.carecommunity.SheQujujia;
import com.example.bean.carecommunity.Vo.RiZhaoVO;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface JujiayanglaoMapper {

    List<SheQujujia> selectJujiayanglaoAll(RiZhaoVO riZhaoVO);

    @Select("select * from t_basicinformation where noid=#{jigouId}")
    SheQujujia selectJiGou(String jigouId);

    Integer addjujia(SheQujujia rijianzhaoliao);

    @Update("update rijianzhaoliao set is_xiaofangyijian=1,is_shiyaojianyijian=1,is_huanpingyijian=1,is_other=1 where noid=#{noid}")
    Integer updateXukeBasc(String noid);

    @Update("update rijianzhaoliao set is_xiaofangyijian=0 where noid=#{noid}")
    Integer updatea(String noid);

    @Update("update rijianzhaoliao set is_shiyaojianyijian=0 where noid=#{noid}")
    Integer updateb(String noid);

    @Update("update rijianzhaoliao set is_huanpingyijian=0 where noid=#{noid}")
    Integer updatec(String noid);

    @Update("update rijianzhaoliao set is_other=0 where noid=#{noid}")
    Integer updated(String noid);

    @Insert("insert into shequjujia_zhibiao values(replace(uuid(),'-',''),#{noid},#{fuwuxiangid},#{index})")
    Integer addzhongjian(@Param("index") String index, @Param("fuwuxiangid") String fuwuxiangid, @Param("noid") String noid);
}